package com.fowo.api.model.purchase.rgoods.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 采购退货单 导入导出辅助模型 */
@Getter
@Setter
public class PurchaseRgoodsOrderExcelPo {

  @NotNull(message = "采购仓库不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*采购仓库")
  private String widName;

  @ExcelIgnore
  @ExcelProperty(value = "*采购仓库")
  private Long wid;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退货单号")
  private String orderNo;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "创建人")
  private String creatorUserName;

  @ExcelIgnore
  @ExcelProperty(value = "创建人")
  private Long creatorUser;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "创建时间")
  private java.util.Date creatorTime;

  @NotNull(message = "供应商不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*供应商")
  private String supplierIdSupplierName;

  @ExcelIgnore
  @ExcelProperty(value = "*供应商")
  private Long supplierId;

  @Size(max = 50, message = "采购单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购单号")
  private String purchaseOrderCode;

  @Size(max = 50, message = "币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "币种")
  private String purchaseCurrency;

  @Size(max = 50, message = "采购员长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购员")
  private String buyerUidName;

  @ExcelIgnore
  @ExcelProperty(value = "采购员")
  private Long buyerUid;

  @EnumsString(
    value = { "退货扣款", "退货补货" },
    message = "退款方式的可用值为 “退货扣款”, “退货补货” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退款方式")
  private String returnMethod;

  @ExcelProperty(value = "退货运费")
  private java.math.BigDecimal shippingPrice;

  @ExcelProperty(value = "其他费用")
  private java.math.BigDecimal otherFee;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "退货时间")
  private java.util.Date applicationDate;

  @Size(max = 50, message = "退货原因长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退货原因")
  private String returnReason;

  @EnumsString(
    value = { "待审批", "已驳回", "已作废", "已处理" },
    message = "状态的可用值为 “待审批”, “已驳回”, “已作废”, “已处理” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "状态")
  private String status;

  @Size(max = 500, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
